/**
 * Created by xiey on 2016/4/18.
 */
var path  = require('path'),
    util  = require('gulp-util'),
    print = require('gulp-print');

module.exports = {
    paths       : {
        src  : path.resolve(__dirname, '../../src'),
        build: path.resolve(__dirname, '../../build'),
        tmp  : path.resolve(__dirname, '../../.tmp')
    },
    errorHandler: (title) => {
        return (err) => {
            util.log(util.colors.red('[' + title + ']'), err.toString());
            this.emit('end');
        };
    },
    genLog      : () => {
        return print((filepath) => {
            return util.colors.green('生成 ') + filepath;
        });
    }
};